﻿<%namespace YouHP.Model%>
<%namespace YouHP.Utility%>
<%template _header%>

<div class="layout-cols2">
<%template _memmenu%>
	<div class="pannelcontent">

		<div class="pcontent">
		<div class="panneldetail">
	     <%template _memrecordermenu%>
	     	
			<div class="pannelbody">
	
		    <%csharp%>if( IsPost){ <%/csharp%>
	    
	    <%template _MsgBox%>
	    
	    <%csharp%> } else { <%/csharp%>
	    
	    <div class="box">
	        <div class="caption">
	            症状情况调查修改
	        </div>
	        <div class="content">
	            <br />
                <%csharp%>TempUrl="/SymptomHistory/SurveyEdit.aspx";<%/csharp%>
	            <form id="symform" name="symform" method="post" action="{this.GetUrl(TempUrl)}">
	            <input type="hidden" name="id" value={SurveyId}>
	             <table class="table-box" width="700px">
	                <tbody>
	                <tr>
                        <td class="table-box-left">日期</td>
	                    <td class="table-box-right">
	                        <input type="text" name="date" 
	                             value="{editRecordDate.ToString("yyyy-MM-dd")}" class="inputstyle" 
	                             onclick="WdatePicker({ isShowClear:false})"
	                         />
	                    </td>
	                 </tr>
	                 <tr>
	                    <td class="">主要症状</td>
	                    <td class="table-box-right"></td>
	                 </tr>
					<%csharp%>
					     foreach(DiseaseSymptomInfo syminfo in PrimarySymptomList)
					     {
					        int data = GetSymptomHistoryData(syminfo.SymptomId);
					<%/csharp%>
					<tr>
					    <input type="hidden" name="sh{syminfo.SymptomId}" value="{GetSymptomHistoryId(syminfo.SymptomId)}" />
					    <td class="table-box-left">{syminfo.SymptomName}</td>
					    <td class="table-box-right">
						    <script type="text/javascript" >
   					      	    function ShowSymDegreeDesp{syminfo.SymptomId}()
							   	{
								    var sel = $('sym{syminfo.SymptomId}').value;
								    var desp = "";
								    if(sel == "{Constants.SYMPTOM_SEVERE}") desp = "<img src=\"/support/alpha/symptom/severe.png\" /> &nbsp;&nbsp;{syminfo.SevereDescription}";
								    else if(sel == "{Constants.SYMPTOM_MODERATE}") desp = "<img src=\"/support/alpha/symptom/moderate.png\" /> &nbsp;&nbsp;{syminfo.ModerateDescription}";
								    else if(sel == "{Constants.SYMPTOM_MILD}") desp = "<img src=\"/support/alpha/symptom/mild.png\" /> &nbsp;&nbsp;{syminfo.MildDescription}";
								    else if(sel == "{Constants.SYMPTOM_NONE}") desp = "";
								    $('SymDegreeDesp{syminfo.SymptomId}').innerHTML = desp;
						      	}
 					       </script>
						   <label for="sym{syminfo.SymptomId}">&nbsp;&nbsp;</label>
						   <select id="sym{syminfo.SymptomId}" 
							    name="sym{syminfo.SymptomId}"
								onchange="ShowSymDegreeDesp{syminfo.SymptomId}();"
						   >
						    <option value="{Constants.SYMPTOM_SEVERE}"
						        <%csharp%> if(data == Constants.SYMPTOM_SEVERE) { <%/csharp%>
						        selected="true"
						        <%csharp%> } <%/csharp%>
						        >重度</option>
						    <option value="{Constants.SYMPTOM_MODERATE}" 
                                <%csharp%> if(data == Constants.SYMPTOM_MODERATE) { <%/csharp%>
						        selected="true"
						        <%csharp%> } <%/csharp%>
						        >中度</option>
						    <option value="{Constants.SYMPTOM_MILD}"
						        <%csharp%> if(data == Constants.SYMPTOM_MILD) { <%/csharp%>
						        selected="true"
						        <%csharp%> } <%/csharp%>
						        >轻度</option>
						    <option value="{Constants.SYMPTOM_NONE}" 
						        <%csharp%> if(data == Constants.SYMPTOM_NONE) { <%/csharp%>
						        selected="true"
						        <%csharp%> } <%/csharp%>
						        >无</option>
						   </select>&nbsp;&nbsp;&nbsp;<span id="SymDegreeDesp{syminfo.SymptomId}"></span>
                        </td>
                    </tr>
					<%csharp%>
					     }
					<%/csharp%> 
								
    	            <tr>
    	                <td class="table-box-left"></td>
    	                <td class="table-box-right"> 
    	                    <span class="btn-min">
	                            <a href="#" onclick="CheckForm();">提交</a>
                            </span>
                        </td>
    	            </tr>   
	                </tbody>
	                </table>             
	            </form>
	            <script type="text/javascript">
	                function CheckForm()
	                {
	                    $('symform').submit();
	                }
	            </script>
	            <br />
	        </div>
	    </div>
	    
	    <%csharp%> } <%/csharp%>
	</div>
	</div>
	</div>
	</div>
		
	
</div>

<%template _footer%>